<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.9.1"/>
<title>opennars: nars.inference.RuleTables.componentAndStatement</title>
<link href="../../tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="../../jquery.js"></script>
<script type="text/javascript" src="../../dynsections.js"></script>
<link href="../../navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="../../resize.js"></script>
<script type="text/javascript" src="../../navtreedata.js"></script>
<script type="text/javascript" src="../../navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
  $(window).load(resizeHeight);
</script>
<link href="../../search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="../../search/searchdata.js"></script>
<script type="text/javascript" src="../../search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { init_search(); });
</script>
<link href="../../doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td style="padding-left: 0.5em;">
   <div id="projectname">opennars
   &#160;<span id="projectnumber">1.5.5</span>
   </div>
   <div id="projectbrief">1.5-ish</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.9.1 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="../../index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="../../pages.html"><span>Related&#160;Pages</span></a></li>
      <li><a href="../../namespaces.html"><span>Packages</span></a></li>
      <li><a href="../../annotated.html"><span>Classes</span></a></li>
      <li><a href="../../files.html"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="../../search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="../../search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('da/de3/classnars_1_1inference_1_1RuleTables_a274b39b31e00ef27ae6baeaad3894a6a.html','../../');});
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="contents">
<a class="anchor" id="a274b39b31e00ef27ae6baeaad3894a6a"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static void nars.inference.RuleTables.componentAndStatement </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="../../d0/dee/classnars_1_1language_1_1CompoundTerm.html">CompoundTerm</a>&#160;</td>
          <td class="paramname"><em>compound</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">short&#160;</td>
          <td class="paramname"><em>index</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="../../d1/d5e/classnars_1_1language_1_1Statement.html">Statement</a>&#160;</td>
          <td class="paramname"><em>statement</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">short&#160;</td>
          <td class="paramname"><em>side</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="../../d8/df4/classnars_1_1storage_1_1Memory.html">Memory</a>&#160;</td>
          <td class="paramname"><em>memory</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span><span class="mlabel">private</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Inference between a component term (of the current term) and a statement. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">compound</td><td>The compound term </td></tr>
    <tr><td class="paramname">index</td><td>The location of the current term in the compound </td></tr>
    <tr><td class="paramname">statement</td><td>The statement </td></tr>
    <tr><td class="paramname">side</td><td>The location of the current term in the statement </td></tr>
    <tr><td class="paramname">memory</td><td>Reference to the memory </td></tr>
  </table>
  </dd>
</dl>

<p>Definition at line <a class="el" href="../../d1/d5e/RuleTables_8java_source.html#l00683">683</a> of file <a class="el" href="../../d1/d5e/RuleTables_8java_source.html">RuleTables.java</a>.</p>

<p>References <a class="el" href="../../da/da1/StructuralRules_8java_source.html#l00622">nars.inference.StructuralRules.contraposition()</a>, <a class="el" href="../../db/d0c/Memory_8java_source.html#l00625">nars.storage.Memory.getCurrentTask()</a>, <a class="el" href="../../d6/d10/Task_8java_source.html#l00135">nars.entity.Task.isStructural()</a>, <a class="el" href="../../da/da1/StructuralRules_8java_source.html#l00252">nars.inference.StructuralRules.structuralDecompose1()</a>, <a class="el" href="../../da/da1/StructuralRules_8java_source.html#l00127">nars.inference.StructuralRules.structuralDecompose2()</a>, and <a class="el" href="../../da/da1/StructuralRules_8java_source.html#l00322">nars.inference.StructuralRules.transformSetRelation()</a>.</p>

<p>Referenced by <a class="el" href="../../d1/d5e/RuleTables_8java_source.html#l00045">nars.inference.RuleTables.reason()</a>.</p>
<div class="fragment"><div class="line"><a name="l00684"></a><span class="lineno">  684</span>&#160;                                                                         {</div>
<div class="line"><a name="l00685"></a><span class="lineno">  685</span>&#160;        <span class="keywordflow">if</span> (!memory.<a class="code" href="../../d8/df4/classnars_1_1storage_1_1Memory_a26eda4f00b333b706b4e3d069fdf1508.html#a26eda4f00b333b706b4e3d069fdf1508">getCurrentTask</a>().<a class="code" href="../../dc/ddc/classnars_1_1entity_1_1Task_a23c0c966a1f5687123c089731f951e78.html#a23c0c966a1f5687123c089731f951e78">isStructural</a>()) {</div>
<div class="line"><a name="l00686"></a><span class="lineno">  686</span>&#160;            <span class="keywordflow">if</span> (statement instanceof <a class="code" href="../../d0/df3/classnars_1_1language_1_1Inheritance.html">Inheritance</a>) {</div>
<div class="line"><a name="l00687"></a><span class="lineno">  687</span>&#160;                StructuralRules.structuralDecompose1(compound, index,</div>
<div class="line"><a name="l00688"></a><span class="lineno">  688</span>&#160;                        statement, memory);</div>
<div class="line"><a name="l00689"></a><span class="lineno">  689</span>&#160;                <span class="keywordflow">if</span> (!(compound instanceof <a class="code" href="../../de/d1d/classnars_1_1language_1_1SetExt.html">SetExt</a>)</div>
<div class="line"><a name="l00690"></a><span class="lineno">  690</span>&#160;                        &amp;&amp; !(compound instanceof <a class="code" href="../../d2/dfc/classnars_1_1language_1_1SetInt.html">SetInt</a>)) {</div>
<div class="line"><a name="l00691"></a><span class="lineno">  691</span>&#160;                    StructuralRules.structuralDecompose2(statement, memory); <span class="comment">// {(C-B)</span></div>
<div class="line"><a name="l00692"></a><span class="lineno">  692</span>&#160;                                                                                <span class="comment">// --&gt;</span></div>
<div class="line"><a name="l00693"></a><span class="lineno">  693</span>&#160;                                                                                <span class="comment">// (C-A),</span></div>
<div class="line"><a name="l00694"></a><span class="lineno">  694</span>&#160;                                                                                <span class="comment">// A</span></div>
<div class="line"><a name="l00695"></a><span class="lineno">  695</span>&#160;                                                                                <span class="comment">// @</span></div>
<div class="line"><a name="l00696"></a><span class="lineno">  696</span>&#160;                                                                                <span class="comment">// (C-A)}</span></div>
<div class="line"><a name="l00697"></a><span class="lineno">  697</span>&#160;                                                                                <span class="comment">// |-</span></div>
<div class="line"><a name="l00698"></a><span class="lineno">  698</span>&#160;                                                                                <span class="comment">// A</span></div>
<div class="line"><a name="l00699"></a><span class="lineno">  699</span>&#160;                                                                                <span class="comment">// --&gt;</span></div>
<div class="line"><a name="l00700"></a><span class="lineno">  700</span>&#160;                                                                                <span class="comment">// B</span></div>
<div class="line"><a name="l00701"></a><span class="lineno">  701</span>&#160;                } <span class="keywordflow">else</span> {</div>
<div class="line"><a name="l00702"></a><span class="lineno">  702</span>&#160;                    StructuralRules.transformSetRelation(compound, statement,</div>
<div class="line"><a name="l00703"></a><span class="lineno">  703</span>&#160;                            side, memory);</div>
<div class="line"><a name="l00704"></a><span class="lineno">  704</span>&#160;                }</div>
<div class="line"><a name="l00705"></a><span class="lineno">  705</span>&#160;            } <span class="keywordflow">else</span> <span class="keywordflow">if</span> (statement instanceof <a class="code" href="../../d3/d1f/classnars_1_1language_1_1Similarity.html">Similarity</a>) {</div>
<div class="line"><a name="l00706"></a><span class="lineno">  706</span>&#160;                StructuralRules.structuralDecompose2(statement, memory); <span class="comment">// {(C-B)</span></div>
<div class="line"><a name="l00707"></a><span class="lineno">  707</span>&#160;                                                                            <span class="comment">// --&gt;</span></div>
<div class="line"><a name="l00708"></a><span class="lineno">  708</span>&#160;                                                                            <span class="comment">// (C-A),</span></div>
<div class="line"><a name="l00709"></a><span class="lineno">  709</span>&#160;                                                                            <span class="comment">// A</span></div>
<div class="line"><a name="l00710"></a><span class="lineno">  710</span>&#160;                                                                            <span class="comment">// @</span></div>
<div class="line"><a name="l00711"></a><span class="lineno">  711</span>&#160;                                                                            <span class="comment">// (C-A)}</span></div>
<div class="line"><a name="l00712"></a><span class="lineno">  712</span>&#160;                                                                            <span class="comment">// |-</span></div>
<div class="line"><a name="l00713"></a><span class="lineno">  713</span>&#160;                                                                            <span class="comment">// A</span></div>
<div class="line"><a name="l00714"></a><span class="lineno">  714</span>&#160;                                                                            <span class="comment">// --&gt;</span></div>
<div class="line"><a name="l00715"></a><span class="lineno">  715</span>&#160;                                                                            <span class="comment">// B</span></div>
<div class="line"><a name="l00716"></a><span class="lineno">  716</span>&#160;                <span class="keywordflow">if</span> ((compound instanceof SetExt)</div>
<div class="line"><a name="l00717"></a><span class="lineno">  717</span>&#160;                        || (compound instanceof SetInt)) {</div>
<div class="line"><a name="l00718"></a><span class="lineno">  718</span>&#160;                    StructuralRules.transformSetRelation(compound, statement,</div>
<div class="line"><a name="l00719"></a><span class="lineno">  719</span>&#160;                            side, memory);</div>
<div class="line"><a name="l00720"></a><span class="lineno">  720</span>&#160;                }</div>
<div class="line"><a name="l00721"></a><span class="lineno">  721</span>&#160;            } <span class="keywordflow">else</span> <span class="keywordflow">if</span> ((statement instanceof <a class="code" href="../../da/db6/classnars_1_1language_1_1Implication.html">Implication</a>)</div>
<div class="line"><a name="l00722"></a><span class="lineno">  722</span>&#160;                    &amp;&amp; (compound instanceof <a class="code" href="../../da/d1e/classnars_1_1language_1_1Negation.html">Negation</a>)) {</div>
<div class="line"><a name="l00723"></a><span class="lineno">  723</span>&#160;                StructuralRules.contraposition(statement, memory);</div>
<div class="line"><a name="l00724"></a><span class="lineno">  724</span>&#160;            }</div>
<div class="line"><a name="l00725"></a><span class="lineno">  725</span>&#160;        }</div>
<div class="line"><a name="l00726"></a><span class="lineno">  726</span>&#160;    }</div>
<div class="ttc" id="classnars_1_1language_1_1Inheritance_html"><div class="ttname"><a href="../../d0/df3/classnars_1_1language_1_1Inheritance.html">nars.language.Inheritance</a></div><div class="ttdoc">A Statement about an Inheritance relation. </div><div class="ttdef"><b>Definition:</b> <a href="../../d0/d17/Inheritance_8java_source.html#l00031">Inheritance.java:31</a></div></div>
<div class="ttc" id="classnars_1_1language_1_1SetExt_html"><div class="ttname"><a href="../../de/d1d/classnars_1_1language_1_1SetExt.html">nars.language.SetExt</a></div><div class="ttdoc">An extensionally defined set, which contains one or more instances. </div><div class="ttdef"><b>Definition:</b> <a href="../../d3/d96/SetExt_8java_source.html#l00031">SetExt.java:31</a></div></div>
<div class="ttc" id="classnars_1_1language_1_1Similarity_html"><div class="ttname"><a href="../../d3/d1f/classnars_1_1language_1_1Similarity.html">nars.language.Similarity</a></div><div class="ttdoc">A Statement about a Similarity relation. </div><div class="ttdef"><b>Definition:</b> <a href="../../df/d32/Similarity_8java_source.html#l00031">Similarity.java:31</a></div></div>
<div class="ttc" id="classnars_1_1storage_1_1Memory_a26eda4f00b333b706b4e3d069fdf1508_html_a26eda4f00b333b706b4e3d069fdf1508"><div class="ttname"><a href="../../d8/df4/classnars_1_1storage_1_1Memory_a26eda4f00b333b706b4e3d069fdf1508.html#a26eda4f00b333b706b4e3d069fdf1508">nars.storage.Memory.getCurrentTask</a></div><div class="ttdeci">Task getCurrentTask()</div><div class="ttdoc">The selected Task. </div><div class="ttdef"><b>Definition:</b> <a href="../../db/d0c/Memory_8java_source.html#l00625">Memory.java:625</a></div></div>
<div class="ttc" id="classnars_1_1language_1_1SetInt_html"><div class="ttname"><a href="../../d2/dfc/classnars_1_1language_1_1SetInt.html">nars.language.SetInt</a></div><div class="ttdoc">An intensionally defined set, which contains one or more instances defining the Term. </div><div class="ttdef"><b>Definition:</b> <a href="../../dc/dfd/SetInt_8java_source.html#l00031">SetInt.java:31</a></div></div>
<div class="ttc" id="classnars_1_1entity_1_1Task_a23c0c966a1f5687123c089731f951e78_html_a23c0c966a1f5687123c089731f951e78"><div class="ttname"><a href="../../dc/ddc/classnars_1_1entity_1_1Task_a23c0c966a1f5687123c089731f951e78.html#a23c0c966a1f5687123c089731f951e78">nars.entity.Task.isStructural</a></div><div class="ttdeci">boolean isStructural()</div><div class="ttdoc">Check if a Task is derived by a StructuralRule. </div><div class="ttdef"><b>Definition:</b> <a href="../../d6/d10/Task_8java_source.html#l00135">Task.java:135</a></div></div>
<div class="ttc" id="classnars_1_1language_1_1Negation_html"><div class="ttname"><a href="../../da/d1e/classnars_1_1language_1_1Negation.html">nars.language.Negation</a></div><div class="ttdoc">A negation of a Statement. </div><div class="ttdef"><b>Definition:</b> <a href="../../d0/d66/Negation_8java_source.html#l00031">Negation.java:31</a></div></div>
<div class="ttc" id="classnars_1_1language_1_1Implication_html"><div class="ttname"><a href="../../da/db6/classnars_1_1language_1_1Implication.html">nars.language.Implication</a></div><div class="ttdoc">A Statement about an Inheritance relation. </div><div class="ttdef"><b>Definition:</b> <a href="../../d3/d1a/Implication_8java_source.html#l00031">Implication.java:31</a></div></div>
</div><!-- fragment -->
<p><div id="dynsection-0" onclick="return toggleVisibility(this)" class="dynheader closed" style="cursor:pointer;">
  <img id="dynsection-0-trigger" src="../../closed.png" alt="+"/> Here is the call graph for this function:</div>
<div id="dynsection-0-summary" class="dynsummary" style="display:block;">
</div>
<div id="dynsection-0-content" class="dyncontent" style="display:none;">
<div class="center"><div class="zoom"><iframe scrolling="no" frameborder="0" src="../../da/de3/classnars_1_1inference_1_1RuleTables_a274b39b31e00ef27ae6baeaad3894a6a_a274b39b31e00ef27ae6baeaad3894a6a_cgraph.svg" width="100%" height="600"><p><b>This browser is not able to show SVG: try Firefox, Chrome, Safari, or Opera instead.</b></p></iframe></div>
</div>
</div>
</p>

<p><div id="dynsection-1" onclick="return toggleVisibility(this)" class="dynheader closed" style="cursor:pointer;">
  <img id="dynsection-1-trigger" src="../../closed.png" alt="+"/> Here is the caller graph for this function:</div>
<div id="dynsection-1-summary" class="dynsummary" style="display:block;">
</div>
<div id="dynsection-1-content" class="dyncontent" style="display:none;">
<div class="center"><div class="zoom"><iframe scrolling="no" frameborder="0" src="../../da/de3/classnars_1_1inference_1_1RuleTables_a274b39b31e00ef27ae6baeaad3894a6a_a274b39b31e00ef27ae6baeaad3894a6a_icgraph.svg" width="100%" height="300"><p><b>This browser is not able to show SVG: try Firefox, Chrome, Safari, or Opera instead.</b></p></iframe></div>
</div>
</div>
</p>

</div>
</div>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="../../d7/d81/namespacenars.html">nars</a></li><li class="navelem"><a class="el" href="../../d9/d79/namespacenars_1_1inference.html">inference</a></li><li class="navelem"><a class="el" href="../../da/de3/classnars_1_1inference_1_1RuleTables.html">RuleTables</a></li>
    <li class="footer">Generated on Sun Jan 10 2016 18:03:59 for opennars by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="../../doxygen.png" alt="doxygen"/></a> 1.8.9.1 </li>
  </ul>
</div>
</body>
</html>
